home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-18 | 3.3 KB | 128 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.cpp
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- #ifndef FWABOUT_H
- #include "FWAbout.h"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWUTIL_H
- #include "FWUtil.h"
- #endif
-
- #ifndef FWCFMRES_H
- #include "FWCFMRes.h"
- #endif
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- //========================================================================================
- // Runtime informations
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment machack
- #endif
-
- //========================================================================================
- // CLASS CMacHackPart
- //========================================================================================
-
-
- FW_DEFINE_AUTO(CMacHackPart)
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::CMacHackPart
- //----------------------------------------------------------------------------------------
-
- CMacHackPart::CMacHackPart(ODPart* odPart):
- FW_CPart(odPart, FW_gInstance, kPartInfoID)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::~CMacHackPart
- //----------------------------------------------------------------------------------------
-
- CMacHackPart::~CMacHackPart()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::Initialize
- //----------------------------------------------------------------------------------------
-
- void CMacHackPart::Initialize(Environment* ev)
- {
- FW_CPart::Initialize(ev);
-
- fPresentation = RegisterPresentation(ev, "Apple:Presentation:MacHack", TRUE);
- }
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::NewFrame
- //----------------------------------------------------------------------------------------
-
- FW_CFrame* CMacHackPart::NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage)
- {
- FW_UNUSED(presentation);
- FW_UNUSED(fromStorage);
-
- return FW_NEW(FW_CFrame, (ev, odFrame, presentation, this, kMacHackView));
- }
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::NewPartContent
- //----------------------------------------------------------------------------------------
-
- FW_CContent* CMacHackPart::NewPartContent(Environment* ev)
- {
- return NULL;
- }
-
- //----------------------------------------------------------------------------------------
- // CMacHackPart::DoMenu
- //----------------------------------------------------------------------------------------
-
- FW_Boolean CMacHackPart::DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent)
- {
- FW_Boolean result = TRUE;
- ODCommandID commandID = theMenuEvent.GetCommandID(ev);
-
- switch (commandID)
- {
- case kODCommandAbout:
- ::FW_About(ev, this, kAbout);
- break;
-
- default:
- result = false;
- }
-
- return result;
- }
-